home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / Strong_BS175.ZIP / !StrongBS / Documents / Manual < prev    next >
Text File  |  1997-07-16  |  80KB  |  2,133 lines

  1.  
  2.  
  3.  
  4.                       This manual is not complete yet !!
  5.                    If you could check it out and maybe grammar
  6.                    check it and send it back to me that would
  7.                    be very much appreciated. :-)
  8.  
  9.  
  10.  
  11.                _____ _                         ____   _____ 
  12.               / ____| |                       |  _ \ / ____|
  13.              | (___ | |_ _ __ ___  _ __   __ _| |_) | (___  
  14.               \___ \| __| '__/ _ \| '_ \ / _` |  _ < \___ \ 
  15.               ____) | |_| | | (_) | | | | (_| | |_) |____) |
  16.              |_____/ \__|_|  \___/|_| |_|\__, |____/|_____/ 
  17.                                           __/ |             
  18.                                          |___/              
  19.  
  20.  
  21.  
  22.  
  23.                            
  24.                  ••••••••••••••••••••••••••••••••••••••••••••
  25.                  •                                          •
  26.                  •           v1.75 (17th July 1997)         •
  27.                  •                                          •
  28.                  •        Program and documentation by      •
  29.                  •                                          •
  30.                  •        © Mohsen Alshayef 1993-1997       •
  31.                  •                                          •
  32.                  •         email: mohsen@qatar.net.qa       •
  33.                  •                                          •
  34.                  ••••••••••••••••••••••••••••••••••••••••••••
  35.  
  36.  
  37.  
  38.  
  39.                                    Freeware
  40.                             ••••••••••••••••••••••
  41.  
  42.  
  43.  
  44.  
  45.  
  46. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  47.  
  48.  Manual Content
  49.  ==============
  50.   
  51.   -  Copyright Notice
  52.   -  Welcome
  53.   1. StrongBS Main Features.
  54.   2. What You Need To Run StrongBS.
  55.   3. Setting Up and Installing StrongBS.
  56.   4. Running StrongBS
  57.   5. Upgrading StrongBS.
  58.   6. StrongBS Basics.
  59.   7. The Squash Options
  60.   8. Squeezing BASIC programs into Applications
  61.   9. Special files and Locking variables.
  62.      - Automatic loading of Special files
  63.      - Tokens used in a Special file
  64.  10. The Choices window.
  65.  11. Adding Squash Options.
  66.  12. Speeding BASIC programs.
  67.  13. Troubleshooting.
  68.  14. Frequently Asked Questions.
  69.  15. Feedback to The Author
  70.  16. Obtaining Future Versions of StrongBS
  71.  17. Credits
  72.  
  73. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  74.  
  75.                               Copyright Notice
  76.                              ------------------
  77.  
  78.                          This application is Freeware
  79.  
  80.    The application 'StrongBS' is copyright Mohsen Alshayef 1997. I offer no
  81.    guarantees as to the reliability/stability of this application or any of
  82.                               its functions.
  83.  
  84.    You may copy the application freely provided that the whole application
  85.                             remains unaltered.
  86.  
  87. You may not sell the application without my written permission. However, Public
  88.   Domain libraries may distribute the program provided they charge at most 3
  89.   pounds sterling per disc. If anyone else would like to distribute StrongBS
  90.                  then contact me first to get my permission.
  91.  
  92.  
  93.  
  94.  
  95.  
  96.                               •••••••••••••••
  97.                                   Warning
  98.                               •••••••••••••••
  99.                               
  100.       If you do not program in the BBC BASIC language, you should not use
  101.                                 StrongBS.
  102.          
  103.       If you have access to BASIC program listings that were produced by
  104.      others, you should not try to compress them as you would be altering
  105.     other people programs. Use StrongBS to compress your own programs only.
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  113.  
  114.                                  Welcome
  115.  
  116.  
  117.  Welcome to StrongBS, a utility that tries to compact and speed up your
  118.  BASIC programs. StrongBS is very easy to learn and use.
  119.  
  120.  StrongBS is intended for any programmer writing code in the BBC BASIC
  121.  language. The aim is to compact the code to the minimum size possible.
  122.  Your compacted BASIC code will have the following advantages:
  123.  
  124.  • Small code size - smaller memory space requirement.
  125.                    - faster loading from disc.
  126.  • Faster execution speed.
  127.  • Difficult to read and understand.
  128.  • Difficult to hack and modify.
  129.  • Keeps your programming style and methods confidential :-)
  130.  
  131.  
  132.  
  133.  
  134.  
  135. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  136.  
  137.  1. StrongBS main features
  138.     ======================
  139.  
  140.        ⇨   Produces the most compact BASIC program ever.     
  141.        ⇨   All compression options are under user control including the
  142.            removal of REMarks and spaces.
  143.        ⇨   Over 65 compression options to reduce the size of your program
  144.            to the minimum possible.
  145.        ⇨   Modular design. You can add you own code and routines through a
  146.            very simple interface, they will automatically appear as part
  147.            of StrongBS
  148.        ⇨   User defined compression modes. Select the options you like and
  149.            define your mode so that by one click you can configure all squash
  150.            options you frequently use.
  151.        ⇨   Handles assembler listings very well and produces a very tight
  152.            code that the BASIC interpreter can assemble.
  153.        ⇨   Contains many options and methods never used in other BASIC
  154.            compressor programs before.
  155.            
  156.            In addition to the common methods used by other BASIC compressor
  157.            utilities, the following are new feature unique to StrongBS:
  158.                                                     ------------------
  159.             1. Evaluation of expressions.
  160.             2. Removal of unused variables.
  161.             3. Removal of the Not-Equal sign.
  162.             4. Removal of SYS statements.
  163.             5. Removal of brackets.
  164.             6. Removal of WHEN and OTHERWISE statements.
  165.             7. Removal the STEP token.
  166.             8. Removal the ALIGN directive.
  167.             9. Removal of user defined debug code.
  168.            10. True removal of garbage lines.
  169.            11. True removal of colons.
  170.            12. Conversion of the CHR$ token.
  171.            13. Conversion of spaces.
  172.            14. Conversion strings.
  173.            15. Conversion of memory operators.
  174.            16. Conversion of the TRUE token.
  175.            17. Concatenation of strings.
  176.            18. Concatenation of multi-line IF structure.
  177.            19. Concatenation of DATA lines.
  178.            20. Concatenation of READ statements.
  179.            21. Concatenation of DIM statements and lines.
  180.            22. Concatenation of LOCAL statements and lines.
  181.            23. Concatenation of VDU statements.
  182.            24. Concatenation of assembler directives.
  183.            25. Removal and conversion of assembler mnemonics.
  184.          * 26. Removal of nil variables.
  185.          * 27. Removal and conversion of empty routines.
  186.          * 28. Conversion of common numbers to variables.
  187.            29. Auto generation of Application code using additional compression.
  188.            30. Conversion of assembler instructions into coded form.
  189.  
  190.        Other main features are:
  191.              
  192.        ⇨   Handles line number references, as many GOTO's as you like!
  193.        ⇨   Copes with badly written and badly structured programs. Does not
  194.            complain and doesnt ask you to change your habit of programming.
  195.            As long as it works, do it the way you like. StrongBS will try
  196.            its best to compress it.
  197.        ⇨   Handles LIBRARY files automatically.
  198.        ⇨   Handles the EVAL function through use of defined locked variables
  199.            either by building in your program or through a special file.
  200.        ⇨   Options to keep first REM line or all start REM line in your
  201.            program.
  202.        ⇨   Option to attach (insert) your pre-defined REMs automatically at
  203.            the start of the compressed output file.
  204.        ⇨   Removes all garbage and junk lines between procedures and anywhere
  205.            else in the program. Knows what a true BASIC line from a dummy one.
  206.        ⇨   8 type of concatenations that drastically squeeze your code to the
  207.            limit.
  208.        ⇨   Automatically removes all those unused codes, procedures and
  209.            functions.
  210.        ⇨   Automatically removes that debugging code that you don't want to
  211.            appear in the output file.
  212.        ⇨   Evaluates number expression to give you shorter numbers.
  213.        ⇨   Removes brackets and knows when those brackets you used are not
  214.            needed.
  215.        ⇨   Simple user interface, no fiddling with script files.
  216.        ⇨   Progress display while compressing.
  217.        ⇨   True compression percentage of your result code!
  218.        ⇨   Written in assembler for fast execution. Respectable speed.
  219.        ⇨   Easy fix of any bugs and improvements.
  220.        ⇨   Automatic line numbering.
  221.        ⇨   Future planned cross-referencing outputs.
  222.        ⇨   Through user configured modes, the application can be used for
  223.            any purpose, not only a compressor.
  224.              
  225.                  ••••••••• Hope you enjoy using StrongBS •••••••••
  226.          
  227.        If you have any idea for improvement, please let me know.
  228.          
  229.        If you want StrongBS to do any specific task not already included or
  230.        do it in a different way, let me know so that I can make a tailored
  231.        version that suits your requirements.
  232.  
  233.  
  234. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  235.  
  236.  2. What You Need to Run StrongBS
  237.     =============================
  238.  
  239.     StrongBS requires and Acorn machine with the following specifications:
  240.  
  241.     • RISC OS 3.10 or later.
  242.     • A minimum of 1 Mb of ram free.
  243.     • Floppy or hard disc space (minimum 200 Kbytes).
  244.  
  245.     To date StrongBS has been fully tested on the following machines:
  246.  
  247.     1. A5000 with 4Mb ram - RISC OS 3.10
  248.     2. RiscPC 700 36Mb ram - RISC OS 3.60
  249.     3. RiscPC StrongARM 64Mb ram - RISC OS 3.70
  250.  
  251.  
  252.     Compressed BASIC programs generated by StrongBS has been tested and will
  253.     work with the following versions of BBC BASIC:
  254.  
  255.     1. BASIC V version 1.05
  256.     2. BASIC V version 1.06
  257.     3. BASIC V version 1.14
  258.     4. BASIC V version 1.16
  259.  
  260.  
  261.     It is expected that the compressed BASIC program generated by StrongBS
  262.     will work with future versions of the BBC BASIC language.
  263.  
  264.     If you used StrongBS with different machine specifications or later versions
  265.     of BBC BASIC, please notify the Author (see email address above), so that
  266.     the tested configurations and BASIC versions can be added to the above list.
  267.  
  268.  
  269. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  270.  
  271.  3. Setting Up and Installing StrongBS
  272.     ==================================
  273.  
  274.     StrongBS comes supplied in an archived form. You will need to de-archive
  275.     it first. The method of archiving used may vary depending on the version
  276.     supplied, in any case you will need the application SparkFS or SparkPlug
  277.     to de-archive it.
  278.  
  279.     If you have obtained StrongBS from a PD library or downloaded it from
  280.     an FTP server then you will need to obtain SparkPlug or SparkFS from
  281.     the provider.
  282.  
  283.     All copies supplied by the Author either to individuals or PD libraries
  284.     are archived using SparkFS Zip format.
  285.  
  286.     It is recommended that StrongBS is installed on a Hard disc for faster
  287.     access, however StrongBS will happily work from a floppy disc
  288.  
  289.  
  290. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  291.  
  292.  4. Running StrongBS
  293.     ================
  294.  
  295.     Once installed, StrongBS can be started by double clicking on its icon
  296.     in the directory viewer. The StrongBS icon will appear on the icon bar
  297.     and from now on you are ready to start.
  298.     Click the mouse menu-button over the application icon to view the main
  299.     program menu.
  300.     
  301.     StrongBS has two windows; the main window which can be opened by clicking
  302.     the mouse select-button on the icon-bar icon, and the Choices window
  303.     opened by selecting the "Choices.." option from the main menu.
  304.     
  305.     StrongBS has only one main menu which can be called by pressing the
  306.     menu button on any part of StrongBS application windows or its icon
  307.     bar icon.
  308.  
  309.  
  310.  
  311. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  312.  
  313.  5. Upgrading StrongBS
  314.     ==================
  315.  
  316.     If you are upgrading to a new version of StrongBS, then you may want
  317.     to maintain your previous defined modes, Library files and Remark files.
  318.     To do this, just drag the new StrongBS directory onto the old StrongBS
  319.     directory, this will cause all old similar files to be updated with
  320.     new ones and new files added.
  321.      
  322.  
  323. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  324.  
  325.  6. StrongBS Basics
  326.     ===============
  327.  
  328.  As you work with StrongBS, there are few basic terms you need to become
  329.  familiar with.
  330.  
  331.  •  3rd Party Directory
  332.  
  333.    A directory that contains the code of all additional "Squash Options"
  334.    written either by you or someone else. Any code added will appear under
  335.    the 3rd Party menu.
  336.    
  337.  • 3rd Party Option
  338.  
  339.    A Squash Option that is added by the user or a 3rd party. See adding
  340.    squash options for more details. 3rd Party Option codes reside in the
  341.    "3rd Party Directory".
  342.  
  343.  • Assembly
  344.  
  345.    Means an assembler BASIC listing within the main or "Library File". An
  346.    assembly listing is one that starts with the open square bracket "[" and
  347.    ends with a close square bracket "]".
  348.    
  349.  • Concatenation
  350.  
  351.    A compression method used by StrongBS to join (concatenate) things together
  352.    in order to produce a shorter equivalent.
  353.  
  354.  • Convert
  355.  
  356.    The process used by StrongBS to convert something into another shorter
  357.    equivalent. There are many conversion options to select from.
  358.  
  359.  • Debug code
  360.  
  361.    Part of your BASIC program that contains a code you are using during
  362.    the testing and debugging of your program. If you want this code to be
  363.    completely removed, then StrongBS will do so if you tell it the whereabouts
  364.    of this debug code.
  365.  
  366.  • Label
  367.  
  368.    Means an assembler label that starts with a dot ".".
  369.  
  370.  • Library Directory
  371.  
  372.    A directory that contains "Library-Files".  StrongBS will only lookup the
  373.    first 64 valid "Library-Files" in the directory. Valid files means BASIC
  374.    program files. The "Library Directory" is normally located within StrongBS
  375.    application. StrongBS comes with a directory called "Library" that contains
  376.    example library files. If your preferred library files are located
  377.    elsewhere on the disc, then simply change the <StrongBS$Library> variable
  378.    in the !Run file to point at that directory.
  379.       
  380.  • Library-File
  381.  
  382.    Is a BASIC File that is located in a Library Directory and is displayed by
  383.    StrongBS in the "Library files" sub-menu. Any selected library file will
  384.    be automatically appended to the end of the core BASIC program
  385.    before at the time StrongBS loads your main BASIC program. The library file
  386.    gets compressed along with the main program, so that options set to the main
  387.    program also apply to the Library File. The result compressed file contains
  388.    both your main program and any library files. StrongBS will only display
  389.    the first 64 files found in the Library directory.
  390.    You can select more than one Library file from the "Library files" menu.
  391.  
  392.  • Log file
  393.  
  394.    Is a file that contains all statistical and other details about your
  395.    BASIC program, before and after compression. The content of the log
  396.    file is user defined.
  397.  
  398.  • Modes Directory
  399.  
  400.    A directory that holds user defined "Squash Modes". Up to 32 user modes
  401.    may be defined.
  402.  
  403.  • New Size
  404.  
  405.    The result of the compressed "Output File" size. "New Size" is displayed
  406.    and updated after each compression option is performed.
  407.    
  408.  • Output File
  409.  
  410.    Means the result compressed output file including any appended library
  411.    files.
  412.  
  413.  • Percentage
  414.  
  415.    The percentage ratio and size reduction of the "Output File" compared to
  416.    the "Source File". Percentage is updated after each compression and
  417.    displays the percentage in one hundredth of a unit. Looking at the
  418.    percentage you can immediately tell if any savings have been made.
  419.  
  420.  • Progress Bar
  421.  
  422.    A progress indicator bar that gives the indication of how many options
  423.    are still to be applied and how much have been already performed.
  424.  
  425.  • REMarks-Directory
  426.  
  427.    A directory which contains "REMark-Files". StrongBS will only display the
  428.    first 32 valid "REMark-Files" in the directory. The path of the "REMarks
  429.    Directory" is pointed to by the variable <StrongBS$InsertREM> found in
  430.    the !Run file, you may change this to point at any other directory you
  431.    prefer.
  432.       
  433.  • REMark-File
  434.  
  435.    An "REMark-File" is a file that will be automatically inserted at the
  436.    start of the compressed output result file. A REMark-File can be added to
  437.    the "REMarks-Directory". Only one "REMark-File" can be selected from
  438.    the REMark-File menu. You may have up to 32 REMark-Files.
  439.    
  440.  • Remove
  441.  
  442.    The process used by StrongBS to remove something from your BASIC program
  443.    that is not necessary, redundant or not required. There are several
  444.    removal options to select from.
  445.  
  446.  • Routines
  447.  
  448.    Routines are BASIC functions or procedures defined using DEF FN or
  449.    DEF PROC.
  450.  
  451.  • Size
  452.  
  453.    The original size of the main "Source File" program including the size of
  454.    all loaded "Append" files.
  455.      
  456.  • Source File
  457.  
  458.    The "Source File" is your main BASIC program that is loaded for compression
  459.    including any appended library files.
  460.  
  461.  • Special file
  462.  
  463.    A file that contains information that StrongBS uses and applies to the
  464.    methods used for compressing the current program. A "Special File" is
  465.    a text file that you write to tell StrongBS what to do with the current
  466.    BASIC program in question. You can use it to define variables and/or
  467.    procedure/function names that should not be renamed.
  468.    StrongBS will automatically load the Special file called "SBSMake" if it
  469.    finds one in the directory the BAISC program is loaded from. A special
  470.    file can contain tokens which tell StrongBS what to do.
  471.    
  472.    Note: the "Special-File" is an option, it is not a must have or use.
  473.  
  474.  • Squash Option
  475.  
  476.    A "Squash Option" is an option that is selectable from the Squash Options
  477.    menu. StrongBS comes with over 60 different options to select from.
  478.                      
  479.  • Squash Mode
  480.  
  481.    A Squash Mode, is a collection of "Squash Options" that is pre-defined.
  482.    StrongBS comes with three built-in Squash Modes. You can add your own
  483.    Squash Modes.
  484.    
  485.  • User Mode
  486.  
  487.    Is a user defined "Squash Mode" that can be created by the user and gets
  488.    added automatically to the "Squash Mode" menu. "User Modes" are stored
  489.    in the "Modes Directory".
  490.    
  491.  • Variable
  492.  
  493.    A variable means any real, integer, string, real array, integer array
  494.    or string array, as defined by BASIC rules.
  495.  
  496.  
  497. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  498.  
  499.  7. The Squash Options
  500.     ==================
  501.  
  502.  7.1 General and introduction
  503.      ------------------------
  504.      
  505.      StrongBS provides a large number of options that can be used to reduce
  506.      the size of a BASIC program. Some 60+ options are available.
  507.      The purpose of this Chapter is to briefly explain what each option does.
  508.      
  509.      Squash Options are divided into 10 categories:
  510.      
  511.       1. Assembler
  512.       2. Routines.
  513.       3. Variables.
  514.       4. Conversion.
  515.       5. Concatenation.
  516.       6. Removal.
  517.       7. Remarks.
  518.       8. Constructs.
  519.       9. Miscellaneous.
  520.      10. Make faster.
  521.      
  522.      Although, in the following description, use is made of the words remove,
  523.      convert, etc., StrongBS will only perform an operation such as removal
  524.      of a code or conversion of a token, etc., if the test conditions which
  525.      apply to the particular operation are met. For example when removing
  526.      brackets, StrongBS will test the mathematical operator priority of each
  527.      operator inside and outside the brackets. StrongBS also makes allowance
  528.      for bugs in the current versions of the BASIC interpreter (or as Acorn
  529.      prefer to call them "features") and will ensure that the result BASIC
  530.      file runs correctly.
  531.      
  532.      The following description does not explain HOW StrongBS does it, it
  533.      only gives a brief description of what each option means and what are
  534.      the expected results. It is assumed that you are familiar with BASIC
  535.      and the BASIC assembler.
  536.      
  537.      
  538.  7.2 Assembler Squash Options
  539.      ------------------------
  540.      
  541.      This category provides 11 squashing options. These options will only work
  542.      on assembler listings inside a BASIC program.
  543.      Although BASIC programs are very rarely distributed with an assembler
  544.      source code, if you decide to distribute the source code because the
  545.      program needs to generate the code at run time then StrongBS will
  546.      aid in compressing the assembler listing.
  547.      
  548.      7.2.1  Remove assembler remarks
  549.             ------------------------
  550.             
  551.             This option will remove all remarks inside an assembler listing.
  552.             Remarks in the main program (outside and assembler) will not
  553.             be removed.
  554.             
  555.      7.2.2  Remove zero shifts
  556.             ------------------
  557.             
  558.             This will remove LSL #0, LSR #0 and ASR #0 in the assembler
  559.             listing.
  560.             
  561.      7.2.3  Remove ALIGN directives
  562.             -----------------------
  563.             
  564.             Unnecessary ALIGN directives found in the assembler listing will
  565.             be removed. An ALIGN directive is not required, if it is followed
  566.             by an instruction.
  567.             
  568.      7.2.4  Convert register names
  569.             ----------------------
  570.             
  571.             All register names in the form of R0, R1, PC etc will converted
  572.             into a register number form, i.e. 0, 1, 15 etc..
  573.             
  574.             Note: This option is automatically selected if you select
  575.                   the "Variables Renaming" option, as register name are
  576.                   considered by StrongBS another form of variables!
  577.                   
  578.                   
  579.      7.2.5  Convert SWI name
  580.             ----------------
  581.             
  582.             All SWI names in an assembler listing will be converted into their
  583.             SWI number equivalents.
  584.             
  585.             SWI names that can not be converted will be left as is. Therefore,
  586.             if a SWI name is only existent in a module that is not currently
  587.             loaded, all SWI names for the that module will not be changed.
  588.             You will have to load the module before compressing the BASIC
  589.             program. StrongBS will not complain about the non-existance of
  590.             the module.
  591.             
  592.       7.2.6  Convert directives
  593.              ------------------
  594.              
  595.              This option allows all assembler directives in the form EQUD,
  596.              EQUB and EQUW to be converted into DCD, DCB, DCW respectively.
  597.              
  598.       7.2.7  Convert zero offset
  599.              ------------------
  600.              
  601.              This will convert all occurrences of zero offsets in load
  602.              and store instructions into the shortest form.
  603.              
  604.              LDR R0,[R1,#0]    ----->    LDR R0,[R1]
  605.              LDR R0,[R1],#0    ----->    LDR R0,[R1]
  606.              
  607.              Note: Due to what seems to be a bug in the BASIC assembler,
  608.                    the LDRT Rd,[Rn],#0 or STRT Rd,[Rn],#0 will not be
  609.                    converted as the BASIC assembler will treat the
  610.                    shorter instructions differently.
  611.                    
  612.       
  613.       
  614.       7.2.8  Convert register list
  615.              ---------------------
  616.              
  617.              This option is not yet enabled in this version of StrongBS.
  618.              
  619.              Once enabled, the option will allow converting a register
  620.              list in the STM and LDM instructions into the shortest
  621.              form.
  622.              
  623.              LDMFD  R13!,{R0,R1,R2,PC} ------>  LDMFD R13!,{R0-R2,PC}
  624.              
  625.       
  626.       7.2.9  Convert to shortest directives
  627.              ------------------------------
  628.              
  629.              This will convert all EQUD, EQUB, EQUW, EQUS, DCD, DCB and DCW
  630.              into the shortest form using the "&" and "=" directives.
  631.              
  632.              EQUS               ------>  =
  633.              EQUD or DCD        ------>  &
  634.              EQUB or DCB        ------>  =
  635.              EQUW or DCW        ------>  =
  636.              
  637.       
  638.       7.2.10 Concatenate directives
  639.              ----------------------
  640.              
  641.              This option will reconstruct all those directives by assembling
  642.              the directives and de-assembling them back into a the shortest
  643.              possible form. It can cope with all type of directives and the
  644.              CHR$ keyword.
  645.              With long directive listings, this can produce a very short
  646.              and compact BASIC programs.
  647.              
  648.       
  649.       7.2.11 Assemble into Code
  650.              ------------------
  651.              
  652.              This option will convert (assemble) all ARM instructions
  653.              into the equivalent 32-bit value and use the & directive
  654.              in place with the instruction. For example:
  655.              
  656.              MOV    R0,R1,LSL #2         becomes  &&E1A00101
  657.              LDMFD  R13!,{R0-R12,PC}     becomes  &&E8FD9FFF
  658.              ORREQ  R10,R10,R11,LSL #8   becomes  &&018AA40B
  659.              
  660.  7.3 Routines Squash Options
  661.      ------------------------
  662.      
  663.      Five options are provided that work on procedures and function.
  664.      
  665.      7.3.1  Rename functions
  666.             ----------------
  667.             
  668.             This will rename functions using the shortest possible string.
  669.             One or two character names are used, with shorter names allocated
  670.             to the most frequently used functions.
  671.  
  672.             
  673.      7.3.2  Rename procedures
  674.             ------------------
  675.             
  676.             This will rename procedures using the shortest possible string.
  677.             One or two character names are used, with shorter names allocated
  678.             to the most frequently used procedures.
  679.             
  680.             
  681.      7.3.3  Remove unused functions
  682.             -----------------------
  683.             
  684.             A function definition that is not called in the main program or
  685.             any Library file will cause the complete function to be removed.
  686.             
  687.             
  688.      7.3.4  Remove unused procedures
  689.             ------------------------
  690.             
  691.             A procedure definition that is not called in the main program or
  692.             any Library file will cause the complete procedure to be removed.
  693.     
  694.             
  695.      7.3.5  Remove empty procedure
  696.             ----------------------
  697.             
  698.             This option will remove empty procedure.
  699.             
  700.             
  701.  7.4 Variables Squash Options
  702.      ------------------------
  703.      
  704.      Nine options are provided that work on all type of variables.
  705.      
  706.      7.4.1  Rename Integer variables
  707.             ------------------------
  708.             
  709.             Integer variables are renamed using one or two character variable
  710.             names.
  711.             
  712.      7.4.2  Rename Real variables
  713.             ---------------------
  714.             
  715.             Real variables are renamed using one or two character variable
  716.             names.
  717.             
  718.      7.4.3  Rename String variables
  719.             -----------------------
  720.             
  721.             String variables are renamed using one or two character variable
  722.             names.
  723.             
  724.      7.4.4  Rename Integer arrays
  725.             ---------------------
  726.             
  727.             Integer array variables are renamed using one or two character
  728.             names.
  729.             
  730.      7.4.5  Rename Real arrays
  731.             ------------------
  732.             
  733.             Real array variables are renamed using one or two character variable
  734.             names.
  735.             
  736.      7.4.6  Rename String arrays
  737.             --------------------
  738.             
  739.             String array variables are renamed using one or two character
  740.             variable names.
  741.             
  742.      7.4.7  Rename vars in DATA lines
  743.             -------------------------
  744.             
  745.             This option renames variables found inside DATA lines. 99% of the
  746.             time this OK. However, it is possible that DATA lines contain
  747.             data which although not being a variable is identical to a
  748.             variable name in the program.
  749.             For this purpose and only in this rare situation you can disable
  750.             this option.
  751.             
  752.      7.4.8  Remove unused variables
  753.             -----------------------
  754.             
  755.             Unused variables are those that are only encountered once in the
  756.             program, ie defined but not used. There are exceptions where
  757.             some variables which fall into this description will not be
  758.             removed as they will be required for proper program execution.
  759.             
  760.             StrongBS will, depending on the unused variable location, either
  761.             remove the variable only or remove the whole statement or the
  762.             complete line.
  763.             
  764.             
  765.      7.4.9  Remove nil variables
  766.             --------------------
  767.             
  768.             This option is not yet enabled in this version of StrongBS.
  769.      
  770.  
  771.  7.5 Conversion Squash Options
  772.      -------------------------
  773.      
  774.      Ten options are currently provided in this category. Another 2 options
  775.      will be enabled in the next releases of StrongBS.
  776.      
  777.      7.5.1  SYS names to numbers
  778.             --------------------
  779.             
  780.             All SWI names in an a SYS statement will be converted into their
  781.             SWI number equivalents.
  782.             
  783.             SWI names that can not be converted will be left as is. Therefore,
  784.             if a SWI name is only existent in a module that is not currently
  785.             loaded, all SWI names for the that module will not be changed.
  786.             You will have to load the module before compressing the BASIC
  787.             program. StrongBS will not complain about the non-existance of
  788.             the module.
  789.             
  790.             
  791.      7.5.2  CHR$ to string
  792.             --------------
  793.             
  794.             This will convert a CHR$<no> into a string provided the result
  795.             string can be joined to the end or the start of an existing string.
  796.             
  797.             
  798.      7.5.3  ASC" " to number
  799.             ----------------
  800.             
  801.             This will convert an ASC<string> into the equivalent ASCII code.
  802.             
  803.             
  804.      7.5.4  NEXT <var> to NEXT or NEXT,,
  805.             ----------------------------
  806.             
  807.             This option all cause any optional variable after the NEXT keyword
  808.             to be removed. Also repeated NEXT statements on the same line or
  809.             multi-lines will be concatenated.
  810.             
  811.             
  812.      7.5.5  -1 to TRUE
  813.             ----------
  814.             
  815.             The integer -1 is replaced with the BASIC token TRUE whenever
  816.             possible.
  817.             
  818.             
  819.      7.5.6  Numbers to shortest form
  820.             ------------------------
  821.             
  822.             This option will convert numbers into the shortest representation.
  823.             It can cope with decimal, hexadecimal, binary and shifted numbers.
  824.             The shortest form of the 4 possible representation will be used.
  825.             
  826.             
  827.      7.5.7  Memory operators to shortest
  828.             ----------------------------
  829.             
  830.             Memory indirection operators such as ? and ! will be converted
  831.             into the shortest possible form.
  832.             
  833.             Examples:
  834.             
  835.             pointer%?0=A%                  ?pointer%=A%
  836.             pointer%!0=A%                  !pointer%=A%
  837.             ?(pointer%+3)=A%               pointer%?3=A%
  838.             !(pointer%+4)=A%               pointer%!4=A%
  839.             
  840.      7.5.8  Repeated spaces to SPC
  841.             ----------------------
  842.             
  843.             Repeated spaces in a string will be converted into SPC.
  844.             
  845.             
  846.      7.5.9  Repeated chars to STRING$
  847.             -------------------------
  848.             
  849.             Repeated characters in a string will be converted into STRING$.
  850.             
  851.      
  852.      7.5.10 *FX to SYS "OS_Byte"
  853.             ====================
  854.             
  855.             This option will convert *FX calls into their equivalent
  856.             SYS call using SYS "OS_Byte" or SYS 6.
  857.             
  858.        
  859.      7.5.11 var=var+|-x to var+|-=x
  860.             -----------------------
  861.             
  862.             This option is not yet enabled in this version of StrongBS.
  863.             
  864.             
  865.      7.5.12 Common numbers to variables
  866.             ---------------------------
  867.             
  868.             This option is not yet enabled in this version of StrongBS.
  869.             
  870.             
  871.  7.6 Concatenation Squash Options
  872.      ----------------------------
  873.      
  874.      Nine options are currently provided in this category.
  875.      
  876.      7.6.1  Concatenate Lines
  877.             -----------------
  878.  
  879.             This option will join all lines and statements to produce multi
  880.             statements per line.
  881.             
  882.      7.6.2  Concatenate LOCAL lines
  883.             -----------------------
  884.             
  885.             This option joins together all LOCAL statements and LOCAL lines.
  886.             
  887.  
  888.      7.6.3  Concatenate DIM lines
  889.             ---------------------
  890.             
  891.             This option joins together all DIM statements and DIM lines.
  892.             
  893.             
  894.      7.6.4  Concatenate DATA lines
  895.             ----------------------
  896.             
  897.             This option joins together all DATA statements and DATA lines.
  898.             
  899.             
  900.             
  901.      7.6.5  Concatenate IF...ENDIF lines
  902.             ----------------------------
  903.             
  904.             This option will convert multi-line IF...THEN...ELSE...ENDIF into
  905.             a single  IF..THEN..ELSE statements.
  906.             
  907.             
  908.      7.6.6  Concatenate strings
  909.             -------------------
  910.             
  911.             This option concatenates strings in the form <string1>+<string2>
  912.             into one string.
  913.             
  914.             
  915.      7.6.7  Concatenate READ statements
  916.             ---------------------------
  917.             
  918.             This option joins together all READ statements and READ lines.
  919.             
  920.             
  921.      7.6.8  Concatenate VDU statements
  922.             --------------------------
  923.             
  924.             This option joins together all VDU statements and VDU lines.
  925.  
  926.  
  927.      7.6.9  Concatenate PRINT statements
  928.             ----------------------------
  929.             
  930.             This will convert multi PRINT statements into the shortest form.
  931.  
  932.  
  933.  7.7 Removal Squash Options
  934.      ======================
  935.      
  936.      Fifteen options are currently provided.
  937.      
  938.      7.7.1  Removal of remarks
  939.             ------------------
  940.             
  941.             This will remove all REMark lines in the main program and in
  942.             any attached libraries. It will also cope with *Command remarks.
  943.      
  944.      
  945.      7.7.2  Removal of garbage lines
  946.             ------------------------
  947.             
  948.             Garbage lines are those between procedures and at other locations
  949.             that will never be reached by the program code. These are removed.
  950.             StrongBS will also remove garbage lines in between BASIC program
  951.             code which are normally skipped by the program either by use
  952.             of GOTO's or other constructs.
  953.             
  954.             A line is not removed if it is referenced by another part of the
  955.             program.
  956.      
  957.      7.7.3  Removal of blank lines
  958.             ----------------------
  959.             
  960.             Blank (empty) lines are removed.
  961.             
  962.             A line is not removed if it is referenced by another part of the
  963.             program.
  964.             
  965.             
  966.      7.7.4  Removal of spaces
  967.             -----------------
  968.             
  969.             Unnecessary spaces are removed.
  970.             
  971.             
  972.      7.7.5  Removal of brackets
  973.             -------------------
  974.             
  975.             Unnecessary brackets are removed.
  976.             
  977.             
  978.      7.7.6  Removal of colons
  979.             -----------------
  980.             
  981.             Unnecessary colons between statements and between lines are
  982.             removed.
  983.      
  984.      7.7.7  Removal of fractions
  985.             --------------------
  986.             
  987.             Unnecessary fractional parts in floating point (real) number
  988.             are removed. Example:
  989.             
  990.             X=0.0        becomes X=0
  991.             X=0.1200     becomes X=.12
  992.             
  993.      
  994.      7.7.8  Removal of "not equal" sign
  995.             ---------------------------
  996.             
  997.             The unnecessary "<>0" sign is removed if found in IF, WHILE
  998.             and UNTIL statements. Examples:
  999.             
  1000.             IF var<>0 THEN         becomes IF var THEN
  1001.             WHILE var<>0 ....      becomes WHILE var ....
  1002.             UNTIL var<>0           becomes UNTIL var
  1003.             
  1004.           
  1005.      7.7.9  Removal of THEN
  1006.             ---------------
  1007.             
  1008.             The "THEN" in a single line IF..THEN..ELSE is optional and will be
  1009.             removed if found.
  1010.             
  1011.      
  1012.      7.7.10 Removal of LEN
  1013.             --------------
  1014.             
  1015.             This option is not yet enabled in this version of StrongBS.
  1016.             
  1017.      
  1018.      7.7.11 Removal of LET
  1019.             --------------
  1020.             
  1021.             The redundant LET is removed if found.
  1022.             
  1023.      
  1024.      7.7.12 Removal of STEP
  1025.             ---------------
  1026.             
  1027.             This option removes "STEP 1" in FOR...NEXT loops.
  1028.      
  1029.      7.7.13 Removal of SYS
  1030.             --------------
  1031.             
  1032.             This option removes unnecessary 0's in SYS calls. For example:
  1033.             
  1034.             SYS "OS_xxx",0           becomes  SYS "OS_xxx"
  1035.             SYS "OS_xxx",A%,0        becomes  SYS "OS_xxx",A%
  1036.             SYS "OS_xxx",0,A%        becomes  SYS "OS_xxx",,A%
  1037.             etc...
  1038.             
  1039.      
  1040.      7.7.14 Removal of debug code
  1041.             ---------------------
  1042.             
  1043.             Any lines bracketed between the identifiers "REM --[" and
  1044.             "REM ]--" will be removed.
  1045.             
  1046.             
  1047.      7.7.15 Removal of +/- assignments
  1048.             --------------------------
  1049.             
  1050.             This will remove unnecessary +0 or -0 in assignments. Examples:
  1051.             
  1052.             X%=Y%+0           becomes  X%=Y%
  1053.             Y=Z-0             becomes  Y=Z
  1054.             etc...
  1055.             
  1056.             
  1057.  7.8 Remarks Squash Options
  1058.      ======================
  1059.      
  1060.      7.8.1  Keep first REM line
  1061.             -------------------
  1062.             
  1063.             This option will only only the First REMark line to be preserved.
  1064.             All other REMark lines will be removed, is the "Remove REMarks"
  1065.             option has been selected.
  1066.             
  1067.             
  1068.      7.8.2  Keep initial REM lines
  1069.             ----------------------
  1070.             
  1071.             This option allows ALL REMark lines appearing at the start of a
  1072.             BASIC program to be preserved, and will appear in the final
  1073.             output file.
  1074.      
  1075.      7.8.3  Keep REM starting with
  1076.             ----------------------
  1077.             
  1078.             This option allows REMark lines starting with a sequence of text
  1079.             or characters to be preserved everywhere in the program, and
  1080.             hence will not be removed.
  1081.             
  1082.      
  1083.      7.8.4  Insert REMarks file
  1084.             -------------------
  1085.             
  1086.             This allows a BASIC program file to be inserted at the start of
  1087.             the compressed output file. These will normally be BASIC files
  1088.             containing remark lines, but can be any BASIC file. The file is
  1089.             selectable from a list of files contained in the REMInsert
  1090.             directory. Only one file can be selected.
  1091.             
  1092.      
  1093.  7.9 Constructs Squash Options
  1094.      =========================
  1095.      
  1096.      7.9.1  Remove empty IF constructs
  1097.             -------------------------
  1098.             
  1099.             Empty IF..THEN..ENDIF constructs are removed.
  1100.             
  1101.      
  1102.      7.9.2  Remove empty CASE construct
  1103.             ---------------------------
  1104.             
  1105.             Empty CASE...ENDCASE constructs are removed.
  1106.             
  1107.             
  1108.      7.9.3  Remove duplicate WHEN statements
  1109.             --------------------------------
  1110.             
  1111.             This option is not yet enabled in this version of StrongBS.
  1112.             
  1113.             
  1114.      7.9.4  Remove empty WHEN statements
  1115.             ----------------------------
  1116.             
  1117.             Empty WHEN statements in CASE...ENDCASE constructs are removed.
  1118.             
  1119.      
  1120.      7.9.5  Remove empty OTHERWISE statements
  1121.             ---------------------------------
  1122.             
  1123.              Empty OTHERWISE statements in CASE...ENDCASE constructs are
  1124.              removed.
  1125.      
  1126.      
  1127.      7.9.6  Convert CASE to IF construct
  1128.             ----------------------------
  1129.             
  1130.             Converts a CASE...ENDCASE construct into the equivalent IF..ENDIF
  1131.             construct which is faster to execute..!!
  1132.             
  1133.      
  1134.      7.9.7  Concatenate WHEN statements
  1135.  
  1136.             This option is not yet enabled in this version of StrongBS.
  1137.             
  1138.      
  1139.  7.10 Miscellaneous Squash Options
  1140.       ============================
  1141.       
  1142.       7.10.1  Evaluate expressions
  1143.               --------------------
  1144.               
  1145.               This option allows mathematical expressions to evaluated
  1146.               to produce a shorter equivalent. Currently, only simple
  1147.               expressions are parsed and evaluated, future versions of
  1148.               StrongBS will improve on this.
  1149.       
  1150.       7.10.2  Line numbering
  1151.               --------------
  1152.               
  1153.               This option will re-number the program with increments of 10 or
  1154.               which ever is suitable for the particular size and number of
  1155.               lines in the program.
  1156.        
  1157.       
  1158.       7.10.3  Insert Squash info
  1159.               ------------------
  1160.               
  1161.               This will insert the line:
  1162.               
  1163.               REM Squashed by StrongBS v.vv on dd mmm yyyy
  1164.               
  1165.               at the start of the output file.
  1166.       
  1167.       
  1168.  7.11 Make Faster
  1169.       ===========
  1170.       
  1171.       7.11.1  Convert 0 to FALSE
  1172.       
  1173.               This will convert any 0 into the FALSE token. 0's inside assembler
  1174.               listings and *Commands will not be converted.
  1175.               
  1176.       
  1177.       7.11.2  Convert DIV to >>>
  1178.       
  1179.               This option is not yet enabled in this version of StrongBS.
  1180.       
  1181.       7.11.3  Convert AND to IF
  1182.       
  1183.               This option is not yet enabled in this version of StrongBS.
  1184.               
  1185.       
  1186.       7.11.4  Convert real vars to integers
  1187.       
  1188.               This option is not yet enabled in this version of StrongBS.
  1189.               
  1190.               
  1191.       
  1192. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  1193.  
  1194.  8. Squeezing BASIC programs into Applications
  1195.     ==========================================
  1196.      
  1197.     StrongBS allows you to further squeeze a BASIC program into a file of the
  1198.     type Absolute (&FF8), which can be run just like the original program.
  1199.     The converted program has the advantage of smaller size and is safer
  1200.     against unwanted copying and modifying, because it isn't easily recognizable
  1201.     as a Basic program.
  1202.  
  1203.     StrongBS will try to squeeze the BASIC program using its own method which
  1204.     is similar to that of an LZW method. If the squeezing fails, then the
  1205.     program will not be converted into an Absolute type.
  1206.  
  1207.     There is one important thing you should always remember:
  1208.  
  1209.     If the original BASIC program reads the command line parameters, then
  1210.     the command line parameters would not be passed to your program.
  1211.     You should use an alternative method of using system variables in
  1212.     the !Run file.
  1213.  
  1214.  
  1215.  
  1216.  
  1217. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  1218.  
  1219.  9. Special files and Locking Variables
  1220.     ====================================
  1221.     
  1222.     The purpose of the Special files is to inform StrongBS what variables
  1223.     should not be renamed. A special file is a text file with a list of
  1224.     variable names.
  1225.     
  1226.     Variables may be locked against renaming using one of two methods:
  1227.     
  1228.     1. Using REM lines in the BASIC program:
  1229.     
  1230.        You can use a REMark line like this:
  1231.        
  1232.        10 REM LOCK var1, var2, var3, .....
  1233.        
  1234.        The variable names after REM LOCK will not be renamed.
  1235.        Variables may be separated by colons or may be entered on more REM LOCK
  1236.        lines.
  1237.        StrongBS searches the complete program for REM LOCK lines, so REM LOCK
  1238.        lines can be anywhere in the program.
  1239.        
  1240.     2. Using a Special file:
  1241.     
  1242.        The "Special File" is a text file that lists all variables and
  1243.        routine names that you don't want StrongBS to rename.
  1244.       
  1245.        The first word of the file should be the word "LOCK:" on a separate
  1246.        line. Following this, you list your variables. Please note that
  1247.        this is the word "LOCK" immediately followed by a colon.
  1248.       
  1249.        When listing your variables, you can either list each variable on a
  1250.        separate line or separate them by commas.
  1251.       
  1252.        You can use comments if you like using any of the following
  1253.        reserved characters # or \ or | anywhere in the Special file.
  1254.       
  1255.        Here is an example:
  1256.       
  1257.        Lock:
  1258.       
  1259.        \The following are the variables that are not to be renamed:
  1260.       
  1261.        menu_pointer%(
  1262.        menu_string$(
  1263.        menu_icon%
  1264.        icon%,icon_flag%,icon_size%
  1265.       
  1266.        \The following are the routines that are not to be renamed
  1267.       
  1268.        PROCcreate_menu
  1269.        FNmenu_width
  1270.  
  1271.  
  1272.        Note: The Special file must always end with a blank line.
  1273.        
  1274.        Note: An array variable should be entered until the first
  1275.              opening bracket only. i.e. for pointer%() use pointer%(
  1276.                       
  1277.        You can use "REM LOCK", any where in your program.
  1278.        You can separate variable names with a comma.
  1279.        You can have as many "REM LOCK" lines as you want.
  1280.  
  1281.  
  1282.     Automatic loading of Special files:
  1283.     ===================================
  1284.     
  1285.     This feature allows you to customize a special file for each one of
  1286.     your BASIC programs. StrongBS will automatically search the
  1287.     current directory (from where the loaded BASIC program comes) for
  1288.     the Special file called "SBSMake" if it finds one, it will
  1289.     automatically load it in.
  1290.     
  1291.     This feature can be enabled or disabled in the Choices window.
  1292.     
  1293.     You can tell that a Special file is loaded by observing the "Special
  1294.     file" indicator on StrongBS main window (next to the Squash button)
  1295.     which will show one of the following messages:
  1296.     - "Loaded"       : a Special file is loaded and will be used.
  1297.     - "Not required" : a Special file is not required for this loaded
  1298.                        BASIC program because it has no EVAL functions.
  1299.     - "Required"     : Some EVAL functions found but no Special file
  1300.                        has been loaded.
  1301.  
  1302.  
  1303.  
  1304.    Tokens used in a Special file:
  1305.    ==============================
  1306.    
  1307.    1. Lock:
  1308.    ========
  1309.    
  1310.    The token "lock:" is followed by a list of variables and/or procedures
  1311.    or function names that you do not want StrongBS to rename. Variable
  1312.    names can be separated by commas or new lines.
  1313.    
  1314.      Example:
  1315.    
  1316.      Lock:
  1317.    
  1318.      menu_pointer%(
  1319.      menu_string$(
  1320.      menu_icon%
  1321.      icon%,icon_flag%,icon_size%
  1322.    
  1323.    2. SBSLinkDir:
  1324.    ==============
  1325.    
  1326.    The token "SBSLinkDir:" is followed by a directory pathname that contains
  1327.    BASIC Library files that you want StrongBS to link to the current
  1328.    BASIC program. ALL BASIC files contained in the directory will be linked
  1329.    to the main program. If you want only one or two files then use the
  1330.    "SBSLinkFile:" token instead.
  1331.    
  1332.    Only one Link Directory is looked up by StrongBS.
  1333.    
  1334.      Example:
  1335.     
  1336.      SBSLinkDir: <Obey$Dir>.MyLib
  1337.    
  1338.    3. SBSLinkFile:
  1339.    ===============
  1340.    
  1341.    The token "SBSLinkFile:" is followed by a list of filenames that StrongBS
  1342.    will link to the current BASIC program.
  1343.    
  1344.      Example:
  1345.    
  1346.      SBSLinkFile:
  1347.    
  1348.      <Obey$Dir>.WimpLib
  1349.      <Obey$Dir>.Lib.GenLib
  1350.      <Obey$Dir>.Lib.DrawLib
  1351.    
  1352.    
  1353.    4. SBSRemoveLIBCall:
  1354.    ====================
  1355.    
  1356.    This token allows you to automatically remove any reference to any
  1357.    LIBRARY call in the main program automatically. To do this the
  1358.    token must be followed by the variable "Yes" as follows:
  1359.    
  1360.    SBSRemoveLIBCall: Yes
  1361.    
  1362.    You can enable the automatic removal of LIBRARY calls in the "Choices"
  1363.    window, so that StrongBS will automatically remove LIBRARY calls if
  1364.    an "SBSMake" file is loaded that contained Link files or a link directory.
  1365.    
  1366.    
  1367.    Note: When specifying the pathname for a LinkFile or a LinkDirectory you
  1368.          may use the variable <Obey$Dir>. This variable will be evaluated
  1369.          by StrongBS itself to mean the directory that contains the main
  1370.          BASIC program.
  1371.          
  1372.          
  1373. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  1374.  
  1375. 10. The Choices window
  1376.     ==================
  1377.     
  1378.     The "Choices" window contains the following options/choices:
  1379.     
  1380.     1. Auto-load Special file "SBSMake" (if found).
  1381.        --------------------------------------------
  1382.        
  1383.        With this enabled, StrongBS will search for the file named "SBSMake" in
  1384.        the directory from where the main BASIC program is loaded. If found
  1385.        it will be processed as a Special file.
  1386.     
  1387.    
  1388.     2. Free memory used by StrongBS after file saved.
  1389.        ----------------------------------------------
  1390.        
  1391.        With this enabled, StrongBS will free any wimp claimed memory after
  1392.        the squashed BASIC program is saved.
  1393.  
  1394.        
  1395.     3. Remove LIBRARY calls if "SBSMake" file contains linked files.
  1396.        -------------------------------------------------------------
  1397.        
  1398.        If an SBSMake file that was processed contained linked files or
  1399.        directories that have been linked to the main program, then with
  1400.        this option selected, StrongBS will remove ALL references to
  1401.        LIBRARY calls in the main program. StrongBS assumes that all
  1402.        the necessary library files have been linked and the LIBRARY calls
  1403.        are no longer required.
  1404.        
  1405.  
  1406.     4. Default squash mode.
  1407.        --------------------
  1408.        
  1409.        Select the Squash mode from the menu. StrongBS will use this mode when
  1410.        you start it up.
  1411.        
  1412.        
  1413.        
  1414.     All choices can be set and saved by pressing the "SAVE" button. They may
  1415.     be set without saving by pressing the "Set" button. Press "Cancel" to
  1416.     abandon the operation and close the Choices window.
  1417.     
  1418.     Choices are stored as file "Choices" in the StrongBS "Resources" directory.
  1419.     
  1420.     
  1421. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  1422.  
  1423. 11. Adding Squash Options
  1424.     =====================
  1425.  
  1426.     StrongBS allows you add more "Squash Options" to the existing ones.
  1427.    
  1428.     Options added will automatically appear under the "3rd Party Options" menu.
  1429.    
  1430.     Note: Any type of option can be added. The option does not necessarily have
  1431.           to be a compression or squashing type.
  1432.          
  1433.     A maximum of 32 new Squash Options may be added to the 3rd Party Options
  1434.     menu.
  1435.  
  1436.     If you write any additional options then send me a copy so that it can
  1437.     be included with future versions of StrongBS. The code you write becomes
  1438.     Freeware and the conditions that apply to StrongBS will automatically
  1439.     apply to your code.
  1440.    
  1441.     • How to write your own code?
  1442.       ---------------------------
  1443.      
  1444.      1. You will need to write your code in assembler.
  1445.      
  1446.      2. You don't have to worry about where to store or load the main BASIC
  1447.         program, or your code. StrongBS will take care of that.
  1448.         
  1449.      3. Write your code and test it separately.
  1450.      
  1451.      4. When satisfied that it does what it should, then you can add your code
  1452.         to the "3rdParty" directory, and append some details about your code
  1453.         in the "CodeList" file.
  1454.         
  1455.         A simple example code is given in the 3rdParty directory, have a look
  1456.         at it and also at the "CodeList" text file to get some idea.
  1457.         
  1458.      5. Here is the most important bit your code should do:
  1459.   
  1460.         (a) The first 4 bytes (one word) at the start of your code should
  1461.             be &00000  (i.e. zero).
  1462.             
  1463.         (b) StrongBS calls your code at (code start address)+4
  1464.         
  1465.         (c) The first 4 bytes are reserved so that in future it will be used to
  1466.             pass info (request something) from StrongBS before it executes
  1467.             your code.
  1468.             
  1469.         (d) Your code will be called after all other compression options have
  1470.             been performed. This is important to keep in mind, the program
  1471.             passed to your code is a highly compressed BASIC program!!
  1472.             
  1473.         (e) StrongBS will pass the following information to your code to tell
  1474.             you where the source program is and where it expects you to store
  1475.             the result.
  1476.          
  1477.             Note: Use is made of memory, no disc access required.
  1478.  
  1479.       -----------------------------------------------------------------------
  1480.       |   On entry: StrongBS will pass the following to your code:          |
  1481.       |   ---------                                                         |
  1482.       |             R0 - Memory start address of "Source Program" in memory |
  1483.       |             R1 - Memory start address to store "Output Program"     |
  1484.       |---------------------------------------------------------------------|
  1485.       |   On exit:  Your code should return the following to StrongBS:      |
  1486.       |   --------                                                          |
  1487.       |             R0 - End address of "Output Program". (i.e. end of      |
  1488.       |                  new result program).                               |
  1489.       |             If an error occurred then set bit 31 of R0 and          |
  1490.       |             bit 0-7 to the error number. Bits 8 to 30 will          |
  1491.       |             be the line no. of the program where error occurred.    |
  1492.       |                                                                     |
  1493.       -----------------------------------------------------------------------
  1494.      
  1495.         It is very important that you pass back the end address of the result
  1496.         "Output Program" in R0. StrongBS uses this to calculate the new size
  1497.         of "Output Program" you have generated. "Output File size" = R0 - R1 on
  1498.         entry.
  1499.         
  1500.         Your code gets called by StrongBS front end program which is a BASIC
  1501.         program. So your code is called like this (assuming that your
  1502.         code is loaded by StrongBS in buffer memory code%):
  1503.         
  1504.         A% = Source_Prog_Start%
  1505.         B% = Result_Prog_Start%
  1506.         Result_Prog_End% = USR (code% + 4)
  1507.         
  1508.         You should preserve registers that are important to basic like R13
  1509.         and R14. Any others are free for your code except that you should
  1510.         return result back in R0.
  1511.         
  1512.         StrongBS does not offer you any supporting routines, therefore your
  1513.         code should work on the whole program from start to end.
  1514.         
  1515.         Your code does not have to perform compression! it could do
  1516.         anything to the BASIC program. The result file could be larger than the
  1517.         original! You don't have to worry about size allocated to the result
  1518.         file in memory. In fact you could perform de-compression of the file,
  1519.         although this is not suggested as it is against the purpose of
  1520.         StrongBS.
  1521.         
  1522.    • Important Notes About Your Code
  1523.      -------------------------------
  1524.      
  1525.      1. You must remember that the "Source File" BASIC program passed to
  1526.         your code can be very tightly compressed. Your code should be
  1527.         able to handle this. Therefore, at the testing stage of your
  1528.         code, you should ensure that it does cope with compressed BASIC
  1529.         program listings!!
  1530.         
  1531.      2. The status of the "Source File" BASIC program passed to your code
  1532.         depends on what options have been selected by the user.
  1533.         
  1534.      3. You should not assume that REMarks or spaces have already been
  1535.         removed. The user may not have selected these options. Therefore, your
  1536.         code should make allowance for REMarks and spaces and ignore
  1537.         them.
  1538.         
  1539.      4. Your code should come up with something new, a new option or replace an
  1540.         existing option code.
  1541.         
  1542.         If you think an existing option does not produce the results you want,
  1543.         I suggest you contact me rather than coding your own code.
  1544.         StrongBS is built around some 72 separate codes, these can be very
  1545.         easily changed and customized with very little modification.
  1546.         
  1547.         If you have a new idea for an option that you want to test and
  1548.         experiment with or you are developing another application and
  1549.         think that some of the code used in StrongBS may be applicable or
  1550.         may help speed-up the development stage of your application, let me
  1551.         know so that I could send you some of the source code of the routines
  1552.         and sub-routines I use in StrongBS.
  1553.  
  1554.  
  1555.    The current version of StrongBS assumes that your code can be executed from
  1556.    memory and it will load your code into memory and then call it. StrongBS
  1557.    doesn't allow (yet) 3rd party options to be written as a stand alone
  1558.    application that can be run using the command line nor does it allow
  1559.    the BASIC program to be passed to your code as a file. This may however
  1560.    change in future versions.
  1561.  
  1562.  
  1563. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  1564.  
  1565. 12. Speeding BASIC Programs
  1566.     =======================
  1567.  
  1568.  The speed of execution of any program is not just determined by the power
  1569.  of the microprocessor, but also by how the program is written.
  1570.  
  1571.  One way of speeding up BASIC programs is to use integer variables instead
  1572.  of floating point variables, this also reduces the memory space required
  1573.  for storage of the variables.
  1574.  
  1575.  Another aspect is the structure of the program and the way you choose your
  1576.  BASIC keywords. This might have a significant effect on the speed.
  1577.  Of course StrongBS can't do anything about your programming style and will
  1578.  not be able to re-structure a an interpreted BASIC program.
  1579.  
  1580.  Once a program has been debugged, the final version can be doctored to
  1581.  work much faster. This is where StrongBS comes in. The many options in
  1582.  StrongBS all work towards speeding up your program and reducing its
  1583.  size. StrongBS can improve your program speed by 20% to 30% and reduce
  1584.  it size to 30% - 60% of the original size. A smaller BASIC program
  1585.  allows your program to be very responsive in the desktop environment.
  1586.  
  1587.  Hints for speeding-up your BASIC programs:
  1588.  ------------------------------------------
  1589.  
  1590.   1. Use integer variables instead of floating point variables.
  1591.   2. Use a FOR...NEXT loop instead of a REPEAT...UNTIL or WHILE...ENDWHILE.
  1592.      The FOR...NEXT loop is much faster.
  1593.   3. When comparing more than 2 variables avoid using AND. Use IF instead.
  1594.      For example:
  1595.      
  1596.      IF D%=15 AND M%=12 AND Y%=1997 THEN PRINT "something"
  1597.      
  1598.      can be replaced with the faster equivalent:
  1599.      
  1600.      IF D%=15 IF M%=12 IF Y%=1997 THEN PRINT "something"
  1601.      
  1602.   4. In a comparison structure like in IF structure or CASE structure, place
  1603.      the most common condition first. This will speed execution.
  1604.      
  1605.      For example:
  1606.      
  1607.      CASE condition% OF
  1608.      
  1609.      WHEN 32: PROCspaces
  1610.      WHEN 13: PROCcr
  1611.      WHEN 10: PROClf
  1612.      
  1613.      ENDCASE
  1614.      
  1615.      In the above example the WHEN 32 is placed first because it is
  1616.      expected to occur more often than the rest of the conditions.
  1617.  
  1618.    5. Avoid use of calculations inside a loop structure, if at all
  1619.       possible.
  1620.           
  1621.    6. Finally, use StrongBS to produce shortcuts and compress your program.
  1622.       •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  1623.    
  1624.  
  1625.  
  1626.  
  1627. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  1628.  
  1629. 13. Troubleshooting
  1630.     ===============
  1631.  
  1632.  
  1633.   1. When I run the compressed output program, the error "Unkown or
  1634.      missing variable" is generated.
  1635.       
  1636.      It is most likely that your program contains an EVAL keyword.
  1637.      Ensure that any variables that are passed to the EVAL function
  1638.      as strings, are not renamed by telling StrongBS not to rename
  1639.      these variables (LOCKed variables). See 9 above.
  1640.  
  1641.  
  1642.      
  1643.   2. When I changed some lines in the compressed BASIC program that
  1644.      was created by StrongBS using my favourite editor, the program
  1645.      failed to run and produces errors. It was OK before loading into
  1646.      the editor. What is happening?
  1647.  
  1648.      All editors that handle BASIC programs use either their own code or
  1649.      the built-in BASIC code for tokenising the BASIC line. Secondly some
  1650.      editors work on your BASIC program in text (Ascii) mode not in a
  1651.      tokenised mode, this will even give more errors.
  1652.      
  1653.      The problem is due to the fact that the compressed program has all
  1654.      spaces removed. When tokenising a BASIC line, BASIC and other applications
  1655.      need a space between a BASIC keyword and a variable, else they get
  1656.      confused and they will not tokenise the BASIC keyword, thinking that
  1657.      it is a variable.
  1658.      If the BASIC keyword is not tokenised, this will result in the length
  1659.      of the BASIC line being changed becoming larger than the original.
  1660.      If the line length is already close to the maximum allowed limit of 251
  1661.      bytes per line, it is possible that this limit is exceeded and your
  1662.      editor will give an error that "Line too long". If the line length
  1663.      wasn't exceeded then your editor will happily tokenise the line but
  1664.      using the character equivalent of the BASIC keyword not it's token.
  1665.      When you come to run the program, BASIC will complain that it does
  1666.      not know the particular keyword. If you use the BASIC "LIST" keyword
  1667.      to list the line, you will not be able tell what the problem is, nor
  1668.      if you use an editor that does not show BASIC keywords in a different
  1669.      color.
  1670.      
  1671.      I personally recommend that, if you edit BASIC programs, use an editor
  1672.      that allows you to distinguish BASIC keyword from the rest of the program
  1673.      and most importantly, avoid editing a compressed program.
  1674.  
  1675.  
  1676.      
  1677.   3. My compressed output file failed to run!!!
  1678.   
  1679.      1. Ensure that your BASIC program does not contain the BASIC keyword
  1680.         "EVAL". If it does, then ensure that if "EVAL" is used to evaluate
  1681.         variables or procedure names, these should not be renamed.
  1682.         You will need to lock these variables from being renamed by StrongBS.
  1683.         See FAQ blow on how to do that and 9 above.
  1684.         
  1685.      2. If all EVAL variables are locked, as indicated above, and your
  1686.         compressed program still fails to run then disable all variable
  1687.         renaming and try again. If it did work, then you have discovered
  1688.         a bug in StrongBS, for which I appreciate that you inform me so
  1689.         that I can correct it.
  1690.         
  1691.         You can try compressing with some options disabled to see which
  1692.         option causes the problem.
  1693.         
  1694.         Please see the Section "Feedback to the Author".
  1695.  
  1696.  
  1697.       
  1698.   4. When double clicking on the StrongBS icon, to start it, nothing happens!
  1699.   
  1700.      You copy of StrongBS has become corrupt, try installing StrongBS again.
  1701.  
  1702.  
  1703.  
  1704. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  1705.  
  1706. 14. Frequently Asked Questions
  1707.     ==========================
  1708.  
  1709.  
  1710.    1. I am not interested in the many Squashing Options that StrongBS
  1711.       has, I just want to load my program and its accompanying libraries
  1712.       and produce an output that contains my main program plus the procedures
  1713.       and functions in the LIBRARY files that the main program needs. I don't
  1714.       want to remove anything else or compress anything. Can StrongBS do
  1715.       that for me?
  1716.       
  1717.       Yes, to do that carry out the following:
  1718.  
  1719.       1. Create a text file and name it "SBSMake". Type the following in
  1720.          the SBSMake file:
  1721.          
  1722.          SBSLinkFile:
  1723.          library_filename1
  1724.          library_filename2
  1725.          library_filename3
  1726.          ....ect.
  1727.          
  1728.          or
  1729.          
  1730.          SBSLinkDir: library_direcory_name
  1731.          
  1732.          The second method will link ALL files in the library files.
  1733.          
  1734.       2  Store the "SBSMake" text file in the same directory as your
  1735.          core BASIC program.
  1736.       3. Clear all Squash Modes by clicking on the "Clear All" entry
  1737.          in the "Squash Options" menu. This action clears all selected
  1738.          options.
  1739.       4. Select "Remove unused functions" and "Remove unused procedures"
  1740.          from the "Squash Options Routines" sub-menu.
  1741.       5. Load in your core BASIC program.
  1742.       6. Now you can press the "Squash" button to generate the result file.
  1743.       
  1744.       In the above example we have created a new squash mode that only removes
  1745.       unused functions and unused procedures. If you want you can add it
  1746.       to the "Squash Modes", so next time you do not have to repeat the
  1747.       above process. StrongBS comes with a Squash mode called "Library"
  1748.       that just removes unused procedures and functions, this can be
  1749.       selected from the Squash options menu list.
  1750.       
  1751.  
  1752.       
  1753.   2. I want StrongBS, on startup, to automatically select my favourite Squash
  1754.      Mode. How can I do that?
  1755.      
  1756.      Select the default squash mode from the Choices window. Then save your
  1757.      choices.
  1758.  
  1759.  
  1760.   3. I want to change the color of the progress bar. How can I do it?
  1761.   
  1762.      Load the "Messages" file located in the "Resources" directory into your
  1763.      text editor. Locate the token "BarColor:". The number after the token
  1764.      is the default color, change it to a color number between 0 to 15.
  1765.  
  1766.  
  1767.      
  1768.   4. I have a LIBRARY file that I want StrongBS to compress along with
  1769.      my program, how can I tell it to?
  1770.  
  1771.      The easiest way is to create a text file called "SBSMake" and store
  1772.      it in the same directory as your BASIC program.
  1773.      Type the following in the text file:
  1774.      
  1775.      SBSLinkFile: your_Library_filename_path
  1776.      
  1777.      If your LIBRARY file is in the same directory as the core BASIC program
  1778.      then you can use:
  1779.      
  1780.      SBSLinkFile: <Obey$Dir>.filename
  1781.      
  1782.  
  1783.    5. What is "Debug code removal"? how can I use it? I have lots of code
  1784.       of this sort in my program, and I just don't want it to be
  1785.       compressed, I want it to be removed. How can I do that?
  1786.       
  1787.       Any code that you want to be removed completely, and not appear in
  1788.       your output compressed BASIC program can be bracketed between two
  1789.       identifiers, so that StrongBS knows about it. The start identifier
  1790.       is "REM --[" and the end identifier is "REM ]--". Anything between
  1791.       these two identifiers will be completely removed.
  1792.       Here is an example:
  1793.       
  1794.       
  1795.         10 .......
  1796.         20 REM --[
  1797.         30 debug%=TRUE
  1798.         40 REM ]--
  1799.         50 .......
  1800.         .....
  1801.       1030 .......
  1802.       1040 REM --[
  1803.       1050 IF debug% THEN PROCdebug_msg
  1804.       1060 REM ]--
  1805.       1070 .......
  1806.       .......
  1807.       4000 REM --[
  1808.       4010 DEF PROCdebug_msg
  1809.       4020 .....some more debugging code ...
  1810.       4030 ............
  1811.       4040 ENDPROC
  1812.       4050 REM ]--
  1813.       4060 ....
  1814.       ........
  1815.       
  1816.       In the above example program, all code that would only be used during
  1817.       the development stage for debugging is bracketed between the two
  1818.       identifiers. If the option "Remove Debug" is selected, then StrongBS
  1819.       will automatically remove lines 20 through 40, lines 1040 through 1060
  1820.       and lines 4000 through 4050.
  1821.       
  1822.  
  1823.       
  1824.    6. I want to create my own "Squash Modes". How can I do that?
  1825.    
  1826.       First, setup the squash options you need by selecting those you
  1827.       need and de-selecting those you don't.
  1828.       Now go to the "Create New Mode" sub-menu in the "Squash Modes" menu.
  1829.       Enter the "Mode Title", this is the title of the mode that will
  1830.       appear in the Modes Menu, and enter the "Mode File", this is the filename
  1831.       under which your mode definitions will be saved into the Modes
  1832.       Directory. Press "SAVE" when ready.
  1833.       If you now, go to the "Modes Menu" you will see the "Squash Mode" you
  1834.       have created listed and selected as the current Squash-Mode.
  1835.       
  1836.  
  1837.       
  1838.    7. How can I remove a "Squash Mode" that I have created from the "Squash
  1839.       Modes" menu?
  1840.       
  1841.       In the "Modes Directory", locate the filename that contains the mode
  1842.       definition and delete it. Now re-start StrongBS, it will be gone.
  1843.  
  1844.  
  1845.       
  1846.    8. I only have two variables that I don't want StrongBS to change. I don't
  1847.       want to use a "Special File", is there a shortcut?
  1848.       
  1849.       You can use a REM line in your program. Follow the REM keyword with the
  1850.       word "LOCK" and then your variable name.
  1851.       
  1852.       Here is an example:
  1853.       
  1854.       If you want the variables memory_area% and pointer%() not to be
  1855.       renamed, then you should have the following line in your program:
  1856.       
  1857.       1000 REM LOCK memory_area%,pointer%(
  1858.       
  1859.       Important Note: An array variable should be entered until the first
  1860.                       opening bracket only. i.e. for pointer%() use pointer%(.
  1861.                       
  1862.       You can use "REM LOCK", any where in your program.
  1863.       You can separate variable names with a comma.
  1864.       You can have as many "REM LOCK" lines as you want.
  1865.  
  1866.  
  1867.       
  1868.    9. Can I re-compress the result program again to gain further savings?
  1869.    
  1870.       Yes, you can do that by clicking the "Squashed" button again as
  1871.       many times as you like.
  1872.       
  1873.       StrongBS will try its best to produce the best compression from the
  1874.       first pass. Some routines have been optimized to do that already,
  1875.       however, some routines still don't achieve all they could from the
  1876.       first pass, and a second compression pass may squash the program
  1877.       further saving on few bytes!
  1878.       
  1879.  
  1880.       Warning: StrongBS may not like to re-compress some programs because
  1881.                of a limitation in the current version. StrongBS will let
  1882.                you know in that case.!!
  1883.       
  1884.             
  1885.   10. How can I tell StrongBS about my "Special File" which contains
  1886.       my locked variables?
  1887.  
  1888.  
  1889.       Two methods are used:
  1890.       ---------------------
  1891.       
  1892.       1. Name your Special file "SBSMake" and place it in the same directory
  1893.          as the core BASIC program. StrongBS will automatically load the
  1894.          file and process it whenever you drag the core BASIC program into
  1895.          StrongBS.
  1896.       
  1897.       2. Just drop your "Special File" into StrongBS. StrongBS will then use
  1898.          it for the current BASIC program already loaded into memory.
  1899.       
  1900.          You should load your BASIC program BEFORE loading the Special File.
  1901.       
  1902.          When loading a BASIC program, StrongBS ignores any previously loaded
  1903.          Special files.
  1904.  
  1905.       
  1906.       
  1907.   11. I have a program that has locked variables defined after the "REM LOCK"
  1908.       keyword, can I add more locked variables using a "Special File"?
  1909.       
  1910.       Yes. Any locked variables in a "Special File" are added to those
  1911.       already defined in your program after the "REM LOCK" keyword if
  1912.       any.
  1913.  
  1914.  
  1915.      
  1916.   12. In what format should I write the "Special File"?
  1917.   
  1918.       The "Special File" is a text file that lists all variables and
  1919.       routine names that you don't want StrongBS to rename.
  1920.       
  1921.       The first word of the file should be the word "LOCK:" on a separate
  1922.       line. Following this, you list your variables. Please note that
  1923.       this is the word "LOCK" immediately followed by a colon.
  1924.       
  1925.       When listing your variables, you can either list each variable on a
  1926.       separate line or separated them by commas.
  1927.       
  1928.       You can use comments if you like using any of the following
  1929.       reserved characters # or \ or | anywhere in the Special file.
  1930.       
  1931.       Here is an example:
  1932.       
  1933.       LOCK:
  1934.       
  1935.       \The following are the variables that are not to be renamed:
  1936.       
  1937.       menu_pointer%(
  1938.       menu_string$(
  1939.       menu_icon%
  1940.       icon%,icon_flag%,icon_size%
  1941.       
  1942.       \The following are the routines that are not to be renamed
  1943.       
  1944.       PROCcreate_menu
  1945.       FNmenu_width
  1946.  
  1947.  
  1948.       Note: The Special file must always end with a blank line.
  1949.  
  1950.  
  1951.  
  1952.   13. After compressing my program which contained assembler listings, the
  1953.       program started giving errors such as "unknown or missing variables"
  1954.       and "Syntax error" when I run it with my assembler extended BASIC.
  1955.       
  1956.       Assembler extended BASIC versions which have been patched by utilities
  1957.       such as BasExt or !BAX etc.. allow the BASIC assembler to recognise
  1958.       more assembler mnemonics and new instructions. A BAISC assembler
  1959.       listing compressed with StrongBS might not work with such patched
  1960.       version of BASIC simply because StrongBS does take the new instructions
  1961.       into consideration when, say, removing spaces between opcodes and
  1962.       operands in an instruction. Here is an example:
  1963.       
  1964.       LDR share,[top]
  1965.       
  1966.       StrongBS will compress this by removing the unnecessary space:
  1967.       
  1968.       LDRshare,[top]
  1969.       
  1970.       This is fine for the BASIC assembler, but not for the Extended BASIC
  1971.       assembler. The Extended BASIC assembler will think that the instruction
  1972.       means: LDRsh are,[top].  LDRSH is a valid ARM Architecture V4 instruction
  1973.       which BASIC does not yet support.
  1974.       
  1975.  
  1976.       
  1977.    14. I want StrongBS to always point at my BASIC library files and list
  1978.        them in the "Library Files" menu.
  1979.        
  1980.        StrongBS will normally list all files contained its own directory
  1981.        called "Library". If you want it to point at your own library files
  1982.        stored somewhere else on the disc, do the following:
  1983.        
  1984.        1. Load the !Run file that comes with StrongBS into your text
  1985.           editor.
  1986.           
  1987.        2. Find the line which says:
  1988.        
  1989.           SET StrongBS$Library <Obey$Dir>.Library
  1990.           
  1991.        3. Change this line so that it points at your own library directory.
  1992.           For example: if your library files are stored in the directory
  1993.           "ADFS::HardDisc4.$.Programs.Libraries", then change the line to
  1994.           read:
  1995.           
  1996.           SET StrongBS$Library  ADFS::HardDisc4.$.Programs.Libraries
  1997.           
  1998.        4. Save the new modified !Run file back.
  1999.        
  2000.        5. Quit and re-start StrongBS.
  2001.        
  2002.        6. Now the first 64 files in your library directory will be listed in
  2003.           the "Library Files" menu.
  2004.           
  2005.           
  2006.  
  2007.    15. I want StrongBS to automatically link my library files when I load in
  2008.        a specific BASIC program to squash, i.e. I don't want it to do that for
  2009.        all my BASIC program.
  2010.        
  2011.        Using the Special file called "SBSMake" you can customise StrongBS so
  2012.        that it performs certain operations on the loaded BASIC file and only
  2013.        that BASIC file.
  2014.        Assuming that your particular library files are stored in the directory
  2015.        "$.Programs.Libraries", create a text file and call it "SBSMake".
  2016.        Type the following in the text file:
  2017.        
  2018.        SBSLinkDir: $.Programs.Libraries
  2019.        
  2020.        now save this file to the directory where your main BASIC program
  2021.        resides. Any time you load your file, the SBSMake file gets automatically
  2022.        loaded and ALL files pointed by the "SBSLinkDir:" will be automatically
  2023.        loaded and appended to the core BASIC program.
  2024.        
  2025.        Notes: (1) If you have selected any files from the "Library Files" menu,
  2026.                   these will also be appended.
  2027.              
  2028.               (2) The "SBSMake" file can contain list of variables and
  2029.                   procedure names that you don't want renamed, in this
  2030.                   case you can use the "Lock:" token to do that.
  2031.                   
  2032.                   
  2033. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  2034.  
  2035. 15. Feedback to the Author
  2036.     ======================
  2037.                           
  2038.     The Author encourages any one using this application to report any
  2039.     bugs and/or errors that are discovered in StrongBS itself or in
  2040.     the result compressed program.
  2041.   
  2042.     The Author also welcomes any suggestions and ideas for improvement.
  2043.   
  2044.     Bug reporting:
  2045.     --------------
  2046.   
  2047.     If you find a bug then please give me as many details as possible as to
  2048.     the circumstances that cause it, try and get it repeatable.
  2049.   
  2050.     Try to isolate it to an individual Squash Option by compressing your program
  2051.     using one or group of options at a time.
  2052.   
  2053.     You may send me your original un-compressed BASIC file that produces
  2054.     the error. If you do that please ensure that the program you send is
  2055.     a stand alone program, i.e. does not need other resources to run, like
  2056.     Template files, !Run files, Sprite file, etc.. A bug in StrongBS may
  2057.     not cause an error message to be generated when your compressed program
  2058.     is run, it may cause it to behave differently!!
  2059.   
  2060.     You can also give detailed useful info by comparing the line of the
  2061.     compressed BASIC program that gives the error with the original line
  2062.     of the un-compressed program, to do that de-select the "Line Numbering"
  2063.     option, to speed line number comparison.
  2064.   
  2065.     Suggestions for improvement:
  2066.     ----------------------------
  2067.   
  2068.     If you have any suggestions and/or ideas for improvement that you want to
  2069.     see in StrongBS, please let me know, so that every one can benefit.
  2070.   
  2071.   
  2072.     Contacting me:
  2073.     --------------
  2074.   
  2075.     You can contact me by email: mohsen@qatar.net.qa
  2076.   
  2077.     If you want to send any program you could send them as attachments to
  2078.     the email message using any encoding/attachment you prefer.
  2079.  
  2080.  
  2081.     Reporting bugs with 3rd party options:
  2082.     --------------------------------------
  2083.     
  2084.     It is possible that your program doesn't work because of a bug in a
  2085.     3rd party option. If this occurs, try squashing with 3rd party options
  2086.     disabled.
  2087.     Any bugs discovered in 3rd party options or utilities can be reported
  2088.     to the author of the 3rd party code/utility. Please see the filename
  2089.     "addresses" in the 3rdParty directory on how to contact 3rd party
  2090.     code authors.
  2091.     
  2092.     
  2093. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  2094.  
  2095. 16. Obtaining future versions of StrongBS
  2096.     =====================================
  2097.  
  2098.  
  2099.     I will be sending any future versions of StrongBS to:
  2100.  
  2101.     1) Hensa: e-mail: archive-server@micros.hensa.ac.uk
  2102.               ftp   : micros.hensa.ac.uk (IP 148.88.8.84)
  2103.  
  2104.     2) The Archimedes Public Domain Library (run by David Holden):
  2105.        39 Knighton Park Road
  2106.        Sydenham
  2107.        London
  2108.        SE26 5RN  
  2109.  
  2110.     3) http://www.geocities.com/SiliconValley/Heights/7423
  2111.  
  2112. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  2113.  
  2114. 17. Credits
  2115.     =======
  2116.  
  2117.  
  2118.     See the "Credits" file.
  2119.  
  2120.  
  2121. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• StrongBS •••••••
  2122.  
  2123.  
  2124.                 ••••••••• Hope you find StrongBS useful •••••••••
  2125.  
  2126.  
  2127.  
  2128.   © Mohsen Alshayef
  2129.   
  2130.  email: mohsen@qatar.net.qa
  2131.   
  2132.     17th July 1997
  2133.